package com.tz.oa.sysmanage.entity;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 跟数据库表M_USER表对应的实体类
 * @author Administrator
 *
 */
public class Userinfo implements java.io.Serializable {

    private static final long serialVersionUID = 7195902105451305867L;
    private Long userId;
    @NotNull(message = "用户名不能为空")
    private String userName;
    @NotEmpty(message = "登陆名不能为空")
    private String loginName;
    private String password;
    private Integer age;
    private Integer sex;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    private Date tvUpdate;

    @Override
    public String toString() {
        return "Userinfo{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", loginName='" + loginName + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", birthday=" + birthday +
                ", tvUpdate=" + tvUpdate +
                '}';
    }

    public Long getUserId() {
        return userId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getLoginName() {
        return loginName;
    }
    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public Integer getAge() {
        return age;
    }
    public void setAge(Integer age) {
        this.age = age;
    }
    public Integer getSex() {
        return sex;
    }
    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
    public Date getTvUpdate() {
        return tvUpdate;
    }
    public void setTvUpdate(Date tvUpdate) {
        this.tvUpdate = tvUpdate;
    }


}
